﻿using ProtoBuf;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZyGames.Framework.Model;

namespace ZyGames.DZPocker.Model
{
	/// <summary>
	///	玩家保存头像
	/// </summary>
	[Serializable, ProtoContract]
	[EntityTable(CacheType.Entity, DbConfig.Data, IsExpired = false)]
	public class SharedUserHeadIcon : ShareEntity
	{
		public SharedUserHeadIcon()
			: base(false)
		{
		}
		public SharedUserHeadIcon(int userId, string headIcon)
			: this()
		{
			this.UserID = userId;
			this.HeadIcon = headIcon;
		}

		/// <summary>
		/// 玩家ID
		/// </summary>        
		[ProtoMember(1)]
		[EntityField("UserID", IsKey = true)]
		public int UserID { get; set; }

		/// <summary>
		/// 玩家头像字节流
		/// </summary>        
		[ProtoMember(2)]
		[EntityField("HeadIcon")]
		public String HeadIcon{get;set;}
	}
}